Comp (command)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
In computing, comp is a command used on DEC OS/8,cite-ref-os8-handb-1-0[1] DOS,cite-ref-jamsa1993-2-0[2] DR FlexOS,cite-ref-3[3] IBM OS/2,cite-ref-4[4] Microsoft Windowscite-ref-5[5] and related computer operating systems such as ReactOS. It is used to perform comparisons of multiple computer files to show the differences between them.cite-ref-runningmsdos-6-0[6]
Contents
• History
• Syntax
• See also
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
History
In DOS, the comp command first appeared in PC DOS 1.0cite-ref-7[7] and has been included in most versions of MS-DOS and PC DOS. A newer command, fc was added in DOS 3.3 which allows for line comparisons in addition to binary comparisons. DR DOS 6.0 also includes an implementation of the comp command.cite-ref-drdos6userguide-8-0[8]
Syntax
Parameters
• <Data1> – Location and name of the first file or set of files
• <Data2> – Location and name of the second file or set of files
• /d – Display differences in decimal format (Default is hexadecimal)
• /a – Display differences as characters
• /l – Display the number of the line, instead of the byte offset
• /n=<Number> – Compare only the specified number of lines for each file
• /c – Perform a non case-sensitive comparison
• /off[line] – Process files with the offline attribute set
• /? – Display Help
See also
References
cite-note-os8-handb-11. ↑ "Concise Command Language" (CCL)."OS/8 Handbook" (PDF). April 1974. Retrieved 28 November 2017.
cite-note-jamsa1993-22. ↑ citerefjamsa1993Jamsa, Kris A. (1993), DOS: The Complete Reference, Osborne McGraw-Hill, p. 206, ISBN 0078819040.
cite-note-33. ↑ http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf Archived 2019-09-25 at the Wayback Machine
cite-note-44. ↑ "OS/2 Commands". www.jatomes.com. Archived from the original on 2019-04-14. Retrieved 2019-07-20.
cite-note-55. ↑ "Comp".
cite-note-runningmsdos-66. ↑ citerefwolverton2003Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
cite-note-77. ↑ http://www.bitsavers.org/pdf/ibm/pc/dos/6172220_DOS_1.0_Jan82.pdf
cite-note-drdos6userguide-88. ↑ "DR DOS 6.0 User Guide Optimisation and Configuration Tips" (PDF). Archived from the original (PDF) on 2019-09-30. Retrieved 2019-08-13.
cite-note-99. ↑ "FreeDOS 1.2 Updates Package - comp (FreeDOS Base)". Ibiblio.org. 2006-10-21. Retrieved 2022-09-04.
cite-note-1212. ↑ MS-DOS and Windows command line comp command
Further reading
• citerefcooper2001Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738.
• citerefstanek2008Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623.
External links
Wikibooks has a book on the topic of:
Guide to Windows Commands
• comp | Microsoft Docs